package com.czu;

import com.czu.service.HelloWorld;
import org.apache.cxf.jaxws.JaxWsClientFactoryBean;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

public class client {
    public static void main(String[] args) {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

        factory.setServiceClass(HelloWorld.class);
        factory.setAddress("http://localhost:8080/hello");
        HelloWorld service = (HelloWorld) factory.create();
        String s = service.sayHello("caohao");
        System.out.println(s);
    }
}
